Skip to content

Harden private context and customer inbox boundaries - #126

Merged
suboss87 merged 1 commit into
Mainfrom
fix/privacy-boundaries
Sep 17, 2026
Merged

suboss87 merged 1 commit into
Mainfrom
fix/privacy-boundaries

Conversation

@suboss87

@suboss87 suboss87 commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Prepared outputs could expose private text through malformed markers, redaction previews or inbox metadata. Inbox IDs could also escape the active customer's staged notes. This release seals those paths and adds synthetic regression coverage.

  • Normalize control characters before private parsing; seal truncated markers.
  • Redaction previews show locations only and refuse removal of privacy delimiters.
  • Confine inbox IDs and refuse linked, nonregular or oversized staged inputs; reject privacy boundaries crossing metadata.
  • Explain approved data, AI host controls, partial masking and the synthetic first-use path in README, installation, security, privacy and task guidance.

Scoped independent review findings were fixed and reproduced through CLI tests. Focused privacy/inbox tests pass (38). Full release checks pass: 422 tests, no failures or skips. Package contents checked for private task/session artifacts. Website copy is handled separately in fdeops-web PR #17.

These controls apply to FDEOps-prepared paths. They do not sandbox the AI host or establish regulatory certification.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment thread bin/fde.js
const box = inboxDir(eng)
try { fs.mkdirSync(box, { recursive: true }) } catch (e) { failFs(e, 'create inbox', box) }
try {
if (!checkedInbox(eng)) fs.mkdirSync(box)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Concurrent first inbox stage fails

Two first-time ingest stage calls can both find no inbox, then one mkdirSync fails with EEXIST. One valid staging request is lost.

Suggested change
if (!checkedInbox(eng)) fs.mkdirSync(box)
if (!checkedInbox(eng)) fs.mkdirSync(box, { recursive: true })
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread bin/fde.js
Comment on lines 3473 to +3474
const before = readEng(eng, file)
if (removesMarker(before)) throw new Error('redact refused: privacy delimiter changed during review')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Delimiter race leaves partial redaction

A later file gaining a matching delimiter makes removesMarker throw after earlier files were rewritten. Redaction exits with only some matches removed.

Learn more

Redaction validates all files before writing, but the validation does not hold their locks. The command then locks and rewrites files one at a time. A cooperating writer can change a later file after preflight, causing the new in-lock delimiter check to throw after earlier rewrites. The command has no rollback around this loop.

Example: REMOVE_ME appears in decisions.md and context.md. After preflight, another process changes the matching context line to <private data-note="REMOVE_ME">. The command rewrites decisions.md, rejects context.md, and exits without committing a complete redaction.

Recommended fix: Acquire all touched-file locks in deterministic order before revalidating or writing. Snapshot every file, validate all snapshots, then write them; restore written snapshots if any write fails.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@suboss87
suboss87 merged commit a0890ad into Main Sep 17, 2026
2 checks passed
@suboss87
suboss87 deleted the fix/privacy-boundaries branch September 17, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant